<?php


namespace app\api\controller;


use app\common\lib\Show;
use think\facade\Db;

class Address extends ApiBase
{
    public function getProvince() {
        $data = Db::name('ProvinceCityDistrict')->where('pid', 0)->select();
        $data = $data->toArray();
        return Show::success($data);
    }

    public function getchildrens($id) {
        $data = Db::name('ProvinceCityDistrict')->where('pid', $id)->select();
        $data = $data->toArray();
        return Show::success($data);
    }
}